package main

//数字阶乘

// 5!
// 5*4*3*2*1
import "fmt"

func factorial(i int) int {
	fmt.Printf("%p\n",&i)
	if(i <= 1) {
		return 1
	}
	//fmt.Println(i)
	return i * factorial(i - 1)
}

//5*factorial(4)
//5*4*factorial(3)
//5*4*3*factorial(2)
//5*4*3*2*factorial(1)
//5*4*3*2*1

func main() {
	var i int = 5
	fmt.Printf("%d! = %d\n", i, factorial(i))
	}